#!/bin/bash
if [[ -n $1 ]]; then
	echo -e "svn update;";
	echo `svn update`;

	newStuff=`svn status .| grep "^?"| awk '{print $2}'`;
	if [[ -n "$newStuff" ]]; then
		echo -e "svn add \`svn status .| grep \"^?\"| awk '{print $2}'\`;";
		echo `svn add $newStuff`;
		echo -e "  new stuff: $newStuff";
	fi

	echo -e "svn commit -m \"$1\";";
	echo -e "\nWhen asked for password, hit enter.\nThen, give it Tahhope@gmail.com as the username and HV9Ys7mY8yu2 as the password.\nIt will also ask if you want to save the encrypted password.  Your answer doens't matter--it won't be saved.\n";
	echo `svn commit -m "$1"`;

	echo -e "\ncd \"/httpdocs/buzz\"";
	echo `cd "/httpdocs/buzz"`;

	echo -e "svn update;";
	echo `svn update`;
	echo -e "\n";
else
	echo -e "\nWHY YOU NO GIVE A COMMIT MESSAGE??\nShame. Guilt. Baggage. White women.\nProper usage is:\n ./commit.sh \"your useful commit message here\"\nNow go back and try again.\n";
fi